<template>
  <div>
    <el-form :model="queryParams" ref="queryForm" size="small" @submit.native.prevent>
      <el-form-item label="层级" prop="level">
        <el-select v-model="queryParams.level" placeholder="层级选择" clearable style="width: 240px" @change="getList">
          <el-option v-for="dict,index in maxLevel" :key="index" :label="index+1" :value="index+1" />
        </el-select>
      </el-form-item>
    </el-form>

    <el-table height="63vh" v-loading="loading" :data="list" stripe border>
      <el-table-column label="序号" type="index" align="center" width="60" />
      <el-table-column label="UID号" prop="id" align="center" width="120" />
      <el-table-column label="层级" prop="level" align="center" />
      <el-table-column label="订单总和" prop="orderNum" align="center" width="130" />
      <el-table-column label="银积分总和" prop="silverAmount" align="center" />
      <el-table-column label="金积分总和" prop="goldAmount" align="center" width="120" />
      <el-table-column label="入金总和" prop="cashEntry" align="center" />
      <el-table-column label="出金总和" prop="cashOut" align="center" />
      <el-table-column label="账户余额" prop="cashAmount" align="center" />
    </el-table>

    <!-- <pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" @pagination="getList" /> -->

  </div>
</template>

<script>
import { listGroupInfoLevelSingle } from "@/api/marketing/team.js";

export default {
  props: ['maxLevel', 'groupId'],
  data() {
    return {
      queryParams: {
        pageNum: 1,
        pageSize: this.global.pageSize,
        level: undefined,
        groupId: undefined
      },
      pageNum: 1,
      list: [],
      total: 0,
      loading: false,
      levelList: [],

    }
  },
  watch: {

  },

  created() {
    this.queryParams.groupId = this.groupId;
    this.getList();
  },

  methods: {
    getList() {
      listGroupInfoLevelSingle(this.queryParams).then((response) => {
        this.list = response.data;
      })
    }
  }
}
</script>

<style>
</style>
